{extend name="layout" /}
{block name="content"}
<div class="layui-tab layui-tab-brief">
	<ul class="layui-tab-title">
	    <li><a href="{:url('index')}">{$pathCurrent['name']}</a></li>
	    <li class="layui-this">{empty name="info"}添加{else /}编辑{/empty}业务员</li>
  	</ul>
</div>
<div class="layui-card-body">
	<form class="layui-form" data-model="form-submit">
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		  	<legend>基本设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<label class="layui-form-label"><span style="color:red;">*</span>编号</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="customer_sn" placeholder="不填写系统自动生成" value="{$info['customer_sn']}" {notempty name="info"}readonly style="color:#999;"{/notempty}>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span style="color:red;">*</span>姓名</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="customer_name" value="{$info['customer_name']}" datatype="*">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">联系号码</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="phone" value="{$info['phone']}">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">备注</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="content" value="{$info['content']}">
			</div>
		</div>
		<div class="layui-form-item">
	    	<div class="layui-input-block">
	    		<input type="hidden" name="id" value="{$info['id']}">
	      		<button class="layui-btn layui-btn-normal">保存</button>
	      		<button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    	</div>
	  	</div>
	</form>
</div>
{/block}
{block name="js"}
<script type="text/javascript" src="/static/lib/assets/data.js"></script>
<script type="text/javascript">
    var mixin = {};
    layui.config({
		base: '/static/lib/mods/'
		, version: '1.0'
	});
    layui.use(['form','layarea'],function(){
        var form = layui.form
        var layarea = layui.layarea
        
        layarea.render({
            elem: '#picker',
            // data: addrData,
            change: function (res) {
                //选择结果
                var str = JSON.stringify(res);
                if( res.province != '请选择省' && res.city != '请选择市' && res.county != '请选择区' ){
                    var str = JSON.stringify(res);
                }else{
                    // alert('地区选择错误');
                    str = '';
                }
            }
        });
        




    });
</script>
{/block}